//
//  UIImageView+Category.m
//  ChangGengHospital
//
//  Created by ZS on 17/2/23.
//  Copyright © 2017年 ZS. All rights reserved.
//

#import "UIImageView+Category.h"

@implementation UIImageView (Category)
+(UIImageView*)creatImageView:(CGRect)cg backGroundImageV:(NSString*)imageName toView:(UIView *)view withContentMode:(UIViewContentMode)contentMode
{
    UIImageView* imageV = [[UIImageView alloc]initWithFrame:cg];
    imageV.image = [UIImage imageNamed:imageName];
    imageV.userInteractionEnabled = YES;
    imageV.contentMode = contentMode;
    [view addSubview:imageV];
    return imageV;
}
+(UIImageView*)creatImageView:(NSString*)imageName toView:(UIView *)view withContentMode:(UIViewContentMode)contentMode
{
    UIImageView* imageV = [[UIImageView alloc]init];
    imageV.image = [UIImage imageNamed:imageName];
    imageV.userInteractionEnabled = YES;
    imageV.contentMode = contentMode;
    [view addSubview:imageV];
    return imageV;
}
@end
